// 自定义节点示例
export const block: ICustomBlockOption = {
	name: "OreoMultiply",
	comments: "自定义乘法节点示例",
	document: "https://www.exporter.top/docs/#/zh-cn/block/custom",
	target: "Fragment",
	inParameters: [
		{
			name: "left",
			type: "AutoDetect",
		},
		{
			name: "right",
			type: "AutoDetect",
		}
	],
	outParameters: [
		{
			name: "output",
            type: "BasedOnInput",
            typeFromInput: "left"
		}
	],
	inLinkedConnectionTypes: [
        {
            input1: "left",
            input2: "right",
            looseCoupling: false
        }
    ],
	includes: [
        // "helperFunctions",
        "shaderToyDeclaration"
    ],
	entryFunctionName: "multiply_{TYPE_left}",
    code: `
        {TYPE_output} myHelper_{TYPE_left}({TYPE_left} l, {TYPE_right} r){ 
			return l * r; 
		}
        void multiply_{TYPE_left}({TYPE_left} l, {TYPE_right} r, out {TYPE_output} result) {
           result = myHelper_{TYPE_left}(l, r);
        }
    `
}